<template lang="pug">
  span(style="{fontSize: size;color: color}")
    el-tooltip(:content="title" v-if="title" :open-delay="200")
      svg-icon.svg-icon(:icon-class="iconClass" :class="{disabled: disabled}" @click="$emit('click', $event)")
    div.bpm-svg(v-else )
      svg-icon.svg-icon(:icon-class="iconClass" :class="{disabled: disabled}" @click="$emit('click', $event)")
</template>

<script>
export default {
  name: 'activeSvgIcon',
  props: {
    title: {},
    iconClass: {},
    disabled: {},
    color: {
      default: 'inherit'
    },
    size: {
      default: '16px'
    }
  }
}
</script>

<style scoped lang="scss">
  .svg-icon {
    &.notClick {
      pointer-events: none;
      cursor: default;
    }
    cursor: pointer;
  }
</style>
